<?php

class DBMInFilter implements DBMFilter {
	private $property;
	private $possibleValues;
	
	public function __construct($property, $possibleValues){
		$this->setProperty($property);
		$this->setPossibleValues($possibleValues);
	}
	
	public function getProperty(){
		return $this->property;
	}
	public function setProperty($property){
		$this->property = $property; 
	}
	public function getPossibleValues(){
		return $this->possibleValues;
	}
	public function setPossibleValues($possibleValues){
		$this->possibleValues = $possibleValues;
	}
	public function toSQL($databaseType, DBMCommand $command){
		if($databaseType == DBManager::TYPE_MSSQL){
			return DBMInFilterTranslator::translateToSQLServer($this, $command);	
		} elseif($databaseType == DBManager::TYPE_MYSQL){
			return DBMInFilterTranslator::translateToMySQL($this, $command);
		} elseif($databaseType == DBManager::TYPE_POSTGRESQL){
			return DBMInFilterTranslator::translateToPostgreSQL($this, $command);
		} else {
			throw new UnsupportedDatabaseException($databaseType);
		}
	}
}

?>
